<?php

namespace App\Admin\Form\Field;

use App\Admin\Form\Field;
use Illuminate\Contracts\Support\Arrayable;

class Select extends Field
{
    protected $default = 0;

    protected function additionalVariables()
    {
        $this->options = array_filter($this->options);

        return ['options' => $this->options];
    }

    protected function handleOptions($options)
    {
        $this->options = (array)$options;
    }
}